#include <bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
using ll = long long;
void solve()
{
    string s;
    cin >> s;
    reverse(s.begin(),s.end());
    ll n=s.size();
    if(n&1)
    {
        s.erase(s.begin() + n / 2);
    }
    else 
    {
        s.erase(s.begin());
        s.erase(s.end()-1);
    }
    //cout<<s<<endl;
    for(ll i=0;i<s.size()-1;i+=2)
    {
        swap(s[i], s[i + 1]);
    }
    cout << s;
}
int main()
{
    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
   return 0;
}
